<?php
/**
 * ============================================================================
 * 版权所有 2008-2011 多多网络，并保留所有权利。
 * 网站地址: http://soft.duoduo123.com；
 * ----------------------------------------------------------------------------
 * 这不是一个自由软件！您只能在不用于商业目的的前提下对程序代码进行修改和
 * 使用；不允许对程序代码以任何形式任何目的的再发布。
 * ============================================================================
*/
error_reporting(0); 
session_start();
?>
<script language="javascript">
function doClick(){
    var o=document.getElementById('goto');
    if(document.all){
        o.click();
    }else{
        window.location=o.href;
    }
}
window.onload=doClick;
</script>
<?php 
include_once 'comm/config.php';
include_once 'comm/Taoapi.php';
include 'comm/checkpostandget.php';
$sid=$_GET['sid'];

$Taoapi_Config = Taoapi_Config::Init();
$Taoapi_Config->setCharset('UTF-8');
$Taoapi = new Taoapi;
$uid=$_SESSION["dduserid"]?$_SESSION["dduserid"]:0;
$Taoapi->method = 'taobao.taobaoke.shops.convert';
$Taoapi->fields = 'click_url';
$Taoapi->sids = $sid;
$Taoapi->nick = MYUSERNICK;
$Taoapi->outer_code=$uid;
$TaobaokeData = $Taoapi->Send('get','xml')->getArrayData();
$click_url=$TaobaokeData['taobaoke_shops']['taobaoke_shop']['click_url'];
if($click_url==""){
	$click_url="index.php";
}

echo "<a id=\"goto\" href=\"".$click_url."\">&nbsp;</a>";
?>